package com.atguigu.gmall.order.biz;

import com.atguigu.gmall.model.mq.to.order.OrderCreateMsg;
import com.atguigu.gmall.model.order.vo.OrderConfirmVo;
import com.atguigu.gmall.model.order.vo.OrderSubmitVo;
import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;

import java.text.ParseException;
import java.util.Map;

/**
 * @Author:lyd
 **/
public interface OrderService {
    OrderConfirmVo getOrderConfirmVo();

    Long submitOrder(String tradeNo, OrderSubmitVo submitVo);

    void closeOrder(OrderCreateMsg msg);

    /**
     * 把订单状态修改为已支付
     * @param msg
     */
    void orderStatusToPayed(Map<String, String> msg) throws ParseException;


    /**
     * 商品付款成功，修改订单状态为待发货
     * @param message
     * @param channel
     */
    void orderDeductWareStock(Message message, Channel channel);
}
